package com.ruoyi.basedata.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 区域能耗报
对象 electricity_area_report
 *
 * @author gdqt
 * @date 2025-03-10
 */
@TableName("electricity_area_report")
public class ElectricityAreaReport extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 平台表单自增主键 */
    @TableId(value="id",type = IdType.AUTO)
    private Long id;

    /** 设备归属租户 */
    @Excel(name = "设备归属租户")
    @TableField("tenant_id")
    private String tenantId;

    /** 区域id */
    @Excel(name = "区域id")
    @TableField("area_id")
    private Long areaId;

    /** 区域id */
    @Excel(name = "区域名称")
    @TableField(exist = false)
    private String areaName;


    /** 能耗分类（从数据字典获取） */
    @Excel(name = "能耗分类", readConverterExp = "从=数据字典获取")
    @TableField("energy_use_classification")
    private String energyUseClassification;

    /** 能耗分项（从数据字典获取）,分项取0为能耗报表，大于0为分项报表 */
    @Excel(name = "能耗分项", readConverterExp = "从=数据字典获取")
    @TableField("energy_use_item")
    private String energyUseItem;

    /** 净累积量 */
    @Excel(name = "净累积量")
    @TableField("cumulative_flow")
    private BigDecimal cumulativeFlow;

    /** 平均电池电压 */
    @Excel(name = "平均电池电压")
    @TableField("terminal_vol_avg")
    private BigDecimal terminalVolAvg;

    /** 起始抄表读数 */
    @Excel(name = "起始抄表读数")
    @TableField("start_reading")
    private BigDecimal startReading;

    /** 起始抄表时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "起始抄表时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("start_reading_time")
    private Date startReadingTime;

    /** 终止抄表读数 */
    @Excel(name = "终止抄表读数")
    @TableField("end_reading")
    private BigDecimal endReading;

    /** 终止抄表时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "终止抄表时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("end_reading_time")
    private Date endReadingTime;

    /** 用户平均用量 */
    @Excel(name = "用户平均用量")
    @TableField("user_avg")
    private String userAvg;

    /** 环比上一周期 */
    @Excel(name = "环比上一周期")
    @TableField("hb")
    private String hb;

    /** 用量状态，报警策略设置的参数计算 */
    @Excel(name = "用量状态，报警策略设置的参数计算")
    @TableField("param_type")
    private Long paramType;

    /** 冻结类型，时：hour,日：day，月：month */
    @Excel(name = "冻结类型，时：hour,日：day，月：month")
    @TableField("frozen_type")
    private String frozenType;

    /** 冻结时间（日/月） */
    @Excel(name = "冻结时间", readConverterExp = "日=/月")
    @TableField("freeze_time")
    private String freezeTime;

    /** 抄回状态(1：当天和前天都抄回数据,2：当天有数据抄回，前一天未抄回数据,3：当天未抄回数据。当天表示需要生成日用量的那天。) */
    @Excel(name = "抄回状态(1：当天和前天都抄回数据,2：当天有数据抄回，前一天未抄回数据,3：当天未抄回数据。当天表示需要生成日用量的那天。)")
    @TableField("copy_rate")
    private Integer copyRate;

    @TableField(exist = false)
    private List<Long> areaIds;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setTenantId(String tenantId)
    {
        this.tenantId = tenantId;
    }

    public String getTenantId()
    {
        return tenantId;
    }
    public void setAreaId(Long areaId)
    {
        this.areaId = areaId;
    }

    public Long getAreaId()
    {
        return areaId;
    }
    public void setEnergyUseClassification(String energyUseClassification)
    {
        this.energyUseClassification = energyUseClassification;
    }

    public String getEnergyUseClassification()
    {
        return energyUseClassification;
    }
    public void setEnergyUseItem(String energyUseItem)
    {
        this.energyUseItem = energyUseItem;
    }

    public String getEnergyUseItem()
    {
        return energyUseItem;
    }
    public void setCumulativeFlow(BigDecimal cumulativeFlow)
    {
        this.cumulativeFlow = cumulativeFlow;
    }

    public BigDecimal getCumulativeFlow()
    {
        return cumulativeFlow;
    }
    public void setTerminalVolAvg(BigDecimal terminalVolAvg)
    {
        this.terminalVolAvg = terminalVolAvg;
    }

    public BigDecimal getTerminalVolAvg()
    {
        return terminalVolAvg;
    }
    public void setStartReading(BigDecimal startReading)
    {
        this.startReading = startReading;
    }

    public BigDecimal getStartReading()
    {
        return startReading;
    }
    public void setStartReadingTime(Date startReadingTime)
    {
        this.startReadingTime = startReadingTime;
    }

    public Date getStartReadingTime()
    {
        return startReadingTime;
    }
    public void setEndReading(BigDecimal endReading)
    {
        this.endReading = endReading;
    }

    public BigDecimal getEndReading()
    {
        return endReading;
    }
    public void setEndReadingTime(Date endReadingTime)
    {
        this.endReadingTime = endReadingTime;
    }

    public Date getEndReadingTime()
    {
        return endReadingTime;
    }
    public void setUserAvg(String userAvg)
    {
        this.userAvg = userAvg;
    }

    public String getUserAvg()
    {
        return userAvg;
    }
    public void setHb(String hb)
    {
        this.hb = hb;
    }

    public String getHb()
    {
        return hb;
    }
    public void setParamType(Long paramType)
    {
        this.paramType = paramType;
    }

    public Long getParamType()
    {
        return paramType;
    }
    public void setFrozenType(String frozenType)
    {
        this.frozenType = frozenType;
    }

    public String getFrozenType()
    {
        return frozenType;
    }
    public void setFreezeTime(String freezeTime)
    {
        this.freezeTime = freezeTime;
    }

    public String getFreezeTime()
    {
        return freezeTime;
    }
    public void setCopyRate(Integer copyRate)
    {
        this.copyRate = copyRate;
    }

    public Integer getCopyRate()
    {
        return copyRate;
    }

    public List<Long> getAreaIds() {
        return areaIds;
    }

    public void setAreaIds(List<Long> areaIds) {
        this.areaIds = areaIds;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("tenantId", getTenantId())
            .append("areaId", getAreaId())
            .append("energyUseClassification", getEnergyUseClassification())
            .append("energyUseItem", getEnergyUseItem())
            .append("cumulativeFlow", getCumulativeFlow())
            .append("terminalVolAvg", getTerminalVolAvg())
            .append("startReading", getStartReading())
            .append("startReadingTime", getStartReadingTime())
            .append("endReading", getEndReading())
            .append("endReadingTime", getEndReadingTime())
            .append("userAvg", getUserAvg())
            .append("hb", getHb())
            .append("paramType", getParamType())
            .append("frozenType", getFrozenType())
            .append("freezeTime", getFreezeTime())
            .append("createTime", getCreateTime())
            .append("copyRate", getCopyRate())
            .toString();
    }
}
